home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3427 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1017 b 

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: End of File
  5. Date: Sun, 28 Jan 96 22:23:57 GMT
  6. Organization: none
  7. Message-ID: <822867837snz@genesis.demon.co.uk>
  8. References: <4edr5q$8fi@baloo.pipex-sa.net>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4edr5q$8fi@baloo.pipex-sa.net>
  15.            Unregistered@dial.pipex.co.za "Unregistered" writes:
  16.  
  17. >How does one set the file pointer to end of file on a binary file in C.
  18.  
  19.    fseek(fp, SEEK_END, 0);
  20.  
  21. While the standard doesn't require an implementation to support SEEK_END
  22. on a binary file this is the most portable method (short of reading the
  23. file until you hit an EOF condition).
  24.  
  25. -- 
  26. -----------------------------------------
  27. Lawrence Kirby | fred@genesis.demon.co.uk
  28. Wilts, England | 70734.126@compuserve.com
  29. -----------------------------------------
  30.